Skip to content

Comments

Compare moduleInfo in validating dependent type signatures in cache#432

Merged
NipunaRanasinghe merged 4 commits intoballerina-platform:1.2.xfrom
pasindufernando1:1493FixDuplicate
Oct 25, 2025
Merged

Compare moduleInfo in validating dependent type signatures in cache#432
NipunaRanasinghe merged 4 commits intoballerina-platform:1.2.xfrom
pasindufernando1:1493FixDuplicate

Conversation

@pasindufernando1
Copy link
Contributor

@pasindufernando1 pasindufernando1 commented Oct 25, 2025

Purpose

Duplicate PR of #406 targeting patch 1.3.2
Fixes : wso2/product-ballerina-integrator#1493

Copilot AI review requested due to automatic review settings October 25, 2025 11:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the validation logic for dependent type signatures in the diagram utility cache by incorporating module information checks. The main purpose is to ensure that dependent types are correctly matched not only by name but also by their module metadata (org name, module name, and version).

  • Enhanced the validateDependentTypes method to compare module information when matching dependent type symbols
  • Fixed the module ID retrieval to use the type descriptor's module instead of the type definition symbol's module
  • Added a null check for dependentTypeKeys before processing dependent types

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
misc/diagram-util/src/main/java/org/ballerinalang/diagramutil/connector/models/connector/ReferenceType.java Core logic changes: added module info comparison in dependent type validation and fixed module ID retrieval source
misc/diagram-util/src/test/resources/RefTypeTest/TestData/recordSample1.json Removed empty dependentTypes field from test data
flow-model-generator/modules/flow-model-generator-ls-extension/src/test/resources/data_mapper_model/config/query20.json Removed unused SecondaryPhones record type definition from refs
flow-model-generator/modules/flow-model-generator-ls-extension/src/test/resources/data_mapper_model/config/function_def6.json Updated User type field from nested info record reference to direct firstName string field

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@NipunaRanasinghe NipunaRanasinghe merged commit ba1c61a into ballerina-platform:1.2.x Oct 25, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants